<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自助教程链接上传功能</title>
</head>
<body>
    <div contentEditable="true"></div>
    <button>上传</button>
    <script>
        if(result)
        {
            alert('上传成功！请在主页的教程链接列表里面查看');
        }
    </script>

<?php
    function upload_link($content)
    {
        // 每次在文件末尾写入链接，每写入一行换行
        write_file("data/links.txt",$content);
        return true;
    }
?>
</body>
</html>
